package com.powernode.common;

/**
 * 响应枚举
 * 记录各种响应结果（状态码和提示）
 */
public enum Code {
    /*示例*/
    SUCCESS(1000,"请求成功"),
    FAILURE(9999,"请求失败，稍后重试"),
    PHONE_HAD_REGISTER(1001,"手机号码已被注册"),
    PHONE_FORMAT_ERROR(1002,"手机格式不正确"),
    QUERY_PARAM_ERROR(1003,"参数不正确"),
    SMS_CODE_CANUSE(1004,"您的验证码可以使用无需再次获取"),
    SMS_CODE_INVALIDATE(1005,"验证码无效"),
    LOGIN_ERROR(1006,"账号密码错误"),
    TOKEN_INVALIDATE(4003,"token无效"),
    PRODUCT_INVEST_ERROR(1007,"投资失败")
    ;
    /*枚举响应编码*/
    private Integer code;
    /*枚举响应文本*/
    private String text;
    /*枚举构造函数*/
    Code(int code,String text){
        this.code=code;
        this.text=text;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
